#ifndef CONTROLLER_H
#define CONTROLLER_H

#include <QObject>
#include <QDebug>
#include <QString>
#include <QRegularExpression> // 正则表达式
#include <QMap> // Map字典结构

class Controller : public QObject
{
    Q_OBJECT
public:
    explicit Controller(QObject *parent = nullptr);

    // 方法用于指令分发
    void instructDistribution(QString commend);

signals:
    void Light_ON();
    void Light_OFF();
    void AC_ON();
    void AC_OFF();
    void Music_ON();
    void Music_OFF();


private:
    QMap<QString, std::function<void()>> commandMap;
};

#endif // CONTROLLER_H
